package com.guaika.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guaika.reggie.dto.DishDto;
import com.guaika.reggie.entity.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author GuaiKa
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish>{
    /***
     * 查询菜品口味
     * @param page
     * @param name
     * @return
     */

    Page<List<DishDto>> dishPage(@Param("page")IPage page, @Param("name") String name);

    /**
     * 根据id删除菜品
     * @param ids
     * @return
     */
    int deleteByDishId(Long[] ids);
}
